<?php
/**
 * Created by PhpStorm.
 * User: 76683
 * Date: 2018/12/17
 * Time: 12:20
 */

namespace app\api\controller;

use app\api\model\WeTopic;
use think\Request;

class Search extends Base
{
    protected $weTopicModel = null;

    function __construct(Request $request = null)
    {
        $this->weTopicModel = new WeTopic();
        parent::__construct($request);
    }

    public function topicTitle(){

    }

    public function topicContent(){
        $keyWords = $this->request->post('keywords');
        $data_list = $this->weTopicModel->searchByContent($keyWords,$this->uid);
        list($this->code,$this->msg,$this->data) = [1,'搜索成功',$data_list];
    }
}